package com.ruoyi.suggest.service.impl;

import com.ruoyi.suggest.domain.CrmSuggestRecord;
import com.ruoyi.suggest.mapper.CrmSuggestRecordMapper;
import com.ruoyi.suggest.service.ICrmSuggestRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 维修记录Service业务层处理
 * 
 * @author hct
 * @date 2022-02-11
 */
@Service
public class CrmSuggestRecordServiceImpl implements ICrmSuggestRecordService 
{
    @Autowired
    private CrmSuggestRecordMapper crmSuggestRecordMapper;

    /**
     * 查询维修记录
     * 
     * @param id 维修记录主键
     * @return 维修记录
     */
    @Override
    public CrmSuggestRecord selectCrmSuggestRecordById(Long id)
    {
        return crmSuggestRecordMapper.selectCrmSuggestRecordById(id);
    }

    /**
     * 查询维修记录列表
     * 
     * @param crmSuggestRecord 维修记录
     * @return 维修记录
     */
    @Override
    public List<CrmSuggestRecord> selectCrmSuggestRecordList(CrmSuggestRecord crmSuggestRecord)
    {
        return crmSuggestRecordMapper.selectCrmSuggestRecordList(crmSuggestRecord);
    }

    /**
     * 新增维修记录
     * 
     * @param crmSuggestRecord 维修记录
     * @return 结果
     */
    @Override
    public int insertCrmSuggestRecord(CrmSuggestRecord crmSuggestRecord)
    {
        return crmSuggestRecordMapper.insertCrmSuggestRecord(crmSuggestRecord);
    }

    /**
     * 修改维修记录
     * 
     * @param crmSuggestRecord 维修记录
     * @return 结果
     */
    @Override
    public int updateCrmSuggestRecord(CrmSuggestRecord crmSuggestRecord)
    {
        return crmSuggestRecordMapper.updateCrmSuggestRecord(crmSuggestRecord);
    }

    /**
     * 批量删除维修记录
     * 
     * @param ids 需要删除的维修记录主键
     * @return 结果
     */
    @Override
    public int deleteCrmSuggestRecordByIds(Long[] ids)
    {
        return crmSuggestRecordMapper.deleteCrmSuggestRecordByIds(ids);
    }

    /**
     * 删除维修记录信息
     * 
     * @param id 维修记录主键
     * @return 结果
     */
    @Override
    public int deleteCrmSuggestRecordById(Long id)
    {
        return crmSuggestRecordMapper.deleteCrmSuggestRecordById(id);
    }
}
